// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.modules.dao.impl;

import com.liuxinlong.modules.butler.dto.CommentDto;
import com.liuxinlong.modules.dao.CommentDao;
import com.liuxinlong.modules.entity.Comment;
import com.liuxinlong.modules.mapper.CommentMapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 类描述
 * <p>
 * 此类关联设计的功能
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022年12月6日
 */
@Service
public class CommentDaoImpl extends ServiceImpl<CommentMapper, Comment> implements CommentDao {

    @Override
    public List<Comment> pageCommentList(Map<String, Object> queryParam) {
        return baseMapper.pageCommentList(queryParam);
    }

    @Override
    public int getCommentCount(Map<String, Object> queryParam) {
        return baseMapper.getCommentCount(queryParam);
    }

    @Override
    public List<Comment> pageCommentSubList(Map<String, Object> queryParam) {
        return baseMapper.pageCommentSubList(queryParam);
    }

    @Override
    public int getCommentSubCount(Map<String, Object> queryParam) {
        return baseMapper.getCommentSubCount(queryParam);
    }

    @Override
    public int getAllCommentSubCount(String commentId, String parentId) {
        return baseMapper.getAllCommentSubCount(commentId,parentId);
    }

    @Override
    public List<Comment> queryComments(String parentId) {
        return baseMapper.queryComments(parentId);
    }

    @Override
    public void updateCommentStatus(String id, int status) {
        baseMapper.updateCommentStatus(id, status);
    }

    @Override
    public List<CommentDto> pageCommentManageList(Map<String, Object> queryParam) {
        return baseMapper.pageCommentManageList(queryParam);
    }

    @Override
    public int getCommentManageCount(Map<String, Object> queryParam) {
        return baseMapper.getCommentManageCount(queryParam);
    }
}
